<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	request.setCharacterEncoding("UTF-8");
	String cp = request.getContextPath(); 
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link href="<%=cp%>/data/css/common.css" rel="stylesheet" type="text/css" />
<link href="<%=cp%>/member/css/style.css" rel="stylesheet" type="text/css" />
<link href="<%=cp%>/tour/css/style1.css" rel="stylesheet" type="text/css" />
<link href="<%=cp%>/member/css/board.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=cp%>/data/js/jquery-1.8.2.js"></script>
<script type="text/javascript">
$(function() {        
	 
	 if("${userId}" == null || "${userId}" == ""){
	  location.href = "<%=cp%>/member/login.action";
	  return
	 }
});



function payPopup(reserNo,price) {
	
		var url = "<%=cp%>/member/charge.action?reserNo="+reserNo+"&price="+price;
		window.open(url, "", 
		 "toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,top=0,left=0,width=510,height=600");
	}
	
</script>
</head>
<body>
<!-- Container -->
	<div id="container">
    
		
 
        <script language='javascript'>
            function go2air() {
                document.frm.target = '_parent';
                document.frm.action = 'http://air.kaltour.com/web/index/indexMypage.jsp';
                document.frm.submit();
            }
        </script>
		<!-- Sub Navigation -->
		<div id="subNavigation">
			<h2><img src="<%=cp%>/member/image/h2_mypage.gif" alt="마이페이지" /></h2>
			<ul class="leftMenu">
                <li><a href='<%=cp%>/member/myMenu1.action'><img src='<%=cp%>/member/image/subnavi_mypage1.gif' alt='맞춤형 여행상품' /></a></li>
                <li><a href='<%=cp%>/member/myMenu2.action'><img src='<%=cp%>/member/image/subnavi_mypage2.gif' alt='예약상황' /></a></li>
                <li><a href='<%=cp%>/member/myMenu3.action'><img src='<%=cp%>/member/image/subnavi_mypage3.gif' alt='관심상품' /></a></li>
                <li><a href='<%=cp%>/member/myMenu4.action'><img src='<%=cp%>/member/image/subnavi_mypage4.gif' alt='참여현황' /></a></li>
                <li><a href='<%=cp%>/member/updated.action'><img src='<%=cp%>/member/image/subnavi_mypage5.gif' alt='정보관리' /></a></li>
                <li><a href='<%=cp%>/member/myMenu6.action'><img src='<%=cp%>/member/image/subnavi_mypage6.gif' alt='할인쿠폰' /></a></li>
                <li><a href='<%=cp%>/member/myMenu7.action'><img src='<%=cp%>/member/image/subnavi_mypage7.gif' alt='여행안내서 신청' /></a></li>
			</ul>
			
			
			<div class="banner_member"><a href="http://privacy.kisa.or.kr/event/" target="_blank"><img src="<%=cp%>/member/image/banner_member_01.gif" alt="개인정보 유출은 이제그만" /></a></div>
 
		</div>
		<!-- Sub Navigation //-->
 
        
		
 
		<div id="contents">			
			<div class="titleArea">
				<h3><img src="<%=cp%>/member/image/mypage/h3_reservation_condition.gif" alt="여행상품 예약현황" /><span class="visualImg"><img src="<%=cp%>/member/image/mypage/img_visual.gif"  alt="비주얼이미지" /></span></h3>
				<div class="location">
					<a href="<%=cp%>/main.action"><img src="<%=cp%>/member/image/icon_home.gif" alt="홈" /></a> &gt; <a href="/Mypage/Main">마이페이지</a> &gt; 예약현황 &gt; <b>여행상품</b>
				</div>
			</div>
 
			<div class="conditionTop clear">여행상품 예약하신 건에 대한 각 진행상황입니다.<br />상품명을 클릭하시면 상세정보를 보실 수 있으며, 예약 리스트를 확인하신 후 각 진행상태에 따라 이용하시면 됩니다.</div>
 
			
			<h4><img src="<%=cp%>/member/image/mypage/h4_reservation_condition_gd.gif" alt="예약 상태별 안내" /></h4>
			<table class="tbDataType6" cellspacing="0" cellpadding="0">
				<colgroup>
					<col width="20%" />
					<col width="80%" />
				</colgroup>
				<tbody>
					<tr class="first">
						<th>예약신청</th>
						<td>예약이 접수는 되었지만 아직 출발이 확정된 상황이 아닙니다. 담당자가 메일 또는 전화로 예약 된 내용을 확인하게 됩니다.</td>
					</tr>
					<tr>
						<th>예약</th>
						<td>담당자와의 연락을 통하여 모든 내용이 완료되어 예약이 최종 확정된 상태며, 카드 및 무통장을 통하여<br />결제를 하시면 됩니다</td>
					</tr>
					<tr>
						<th>대기</th>
						<td>고객님께서 예약하신 상품의 좌석이 아직 대기중입니다.</td>
					</tr>
					<tr>
						<th>결제완료</th>
						<td>고객님께서 결제를 완료한 상태입니다. 무통장 입금결제는 확인이 다소 늦어질 수 있습니다.</td>
					</tr>
				</tbody>
			</table>
            
			<h4 class="h4Type6"><span class="floatR" id="spDetailVeiw1"><a href="<%=cp%>/member/myMenu2.action"><img src="<%=cp%>/member/image/btn_detail_veiw.gif" alt="상세보기" /></a></span><img src="<%=cp%>/member/image/mypage/h4_overseas_travel.gif" alt="해외여행" /></h4>
			<table class="tbDataType4" cellspacing="0" cellpadding="0">
				<colgroup>
					<col width="36%" />
					<col width="11%" />
					<col width="11%" />
					<col width="6%" />
					<col width="12%" />
					<col width="10%" />
					<col width="14%" />
				</colgroup>
				<thead>
					<tr>
						<th class="leftN">상품명</th>
						<th>출발일</th>
						<th>예약일</th>
						<th>인원</th>
						<th>금액</th>
						<th>예약상태</th>
						<th>비고</th>
					</tr>
				</thead>
				<tbody>
				<c:if test="${tour != null }">
				<c:forEach var="tour" items="${tour}">
                   <tr>
						<td class="leftN">${tour.subject}</td>
						<td>${tour.startDate}</td>
						<td>${tour.created}</td>
						<td>${tour.inwon}</td>
						<td>${tour.price}</td>
						<td>
							<c:if test="${tour.status == 1}">예약신청</c:if>
							<c:if test="${tour.status == 2}"><a href="javascript: payPopup('${tour.reserNo}','${tour.price}');">예약</a></c:if>
							<c:if test="${tour.status == 3}">결제완료</c:if>
						</td>
						<td>비고</td>
					</tr>
				</c:forEach>
				</c:if>
				<c:if test="${empty tour}">
		            <tr id="ctl00_MAINCONTENT_ReservationList_trOverseasEmptyData">
						<td colspan="7" style="height:50px;" class="leftN">예약 내역이 없습니다.</td>
					</tr>
				</c:if>
				</tbody>
			</table>
 
          
			
			<h4 class="h4Type5"><span class="floatR" id="spDetailVeiw4"><a href="<%=cp%>/member/myMenu2.action"><img src="<%=cp%>/member/image/btn_detail_veiw.gif" alt="상세보기" /></a></span><img src="<%=cp%>/member/image/mypage/h4_buy_airline_ticket.gif" alt="항공권 공동구매" /></h4>
 			<table class="tbDataType4" cellspacing="0" cellpadding="0">
				<colgroup>
					<col width="17%" />
					<col width="16%" />
					<col width="15%" />
					<col width="6%" />
					<col width="12%" />
					<col width="10%" />
					<col width="14%" />
				</colgroup>
				<thead>
					<tr>
						<th class="leftN">목적지</th>
						<th>출발일</th>
						<th>도착일</th>
						<th>인원</th>
						<th>금액</th>
						<th>예약상태</th>
						<th>비고</th>
					</tr>
				</thead>
				<tbody>
                <c:if test="${!empty flight}">
				<c:forEach var="flight" items="${flight}">
                   <tr>
						<td class="leftN">${flight.endPlace}</td>
						<td>${flight.startDate}</td>
						<td>${flight.endDate}</td>
						<td>${flight.inwon}</td>
						<td>${flight.price}</td>
						<td>
							<c:if test="${flight.status == 1}">예약신청</c:if>
							<c:if test="${flight.status == 2}"><a href="javascript: payPopup('${flight.reserNo}','${flight.price}');">예약</a></c:if>
							<c:if test="${flight.status == 3}">결제완료</c:if>
						</td>
						<td>비고</td>
					</tr>
				</c:forEach>
				</c:if>
				<c:if test="${empty flight}">
		            <tr id="ctl00_MAINCONTENT_ReservationList_trOverseasEmptyData">
						<td colspan="7" style="height:50px;" class="leftN">예약 내역이 없습니다.</td>
					</tr>
				</c:if>
				</tbody>
			</table>
			
			<div class="noticeGrayBoxB">
				<div class="noticeGrayBoxT">
					<p><img src="<%=cp%>/member/image/icon_notice.gif" alt="notice" /> <strong>꼭 읽어주세요!</strong></p>
					<ul>
						<li>여행인원에 유아가 포함되어 있는 경우 또는 결제완료 또는 항공출발일 14일 이내 상품의 취소는 공동구매 항공권 담당자에게<br />문의 주시기 바랍니다. <strong>공동구매 항공권 담당자</strong> : <span class="fontCol03">☎ 02-726-5835~6</span></li>
					</ul>
				</div>
			</div>
 
		</div>
 
		
	</div>
	<!-- Container //-->
</body>
</html>